package lhdx8;

public class Cat {
    private String catName;
    private int a;
    private int catPhysicalPower;
    public Cat(){

    }
    public Cat(String catName,int a,int catPhysicalPower){
        this.catName=catName;
        this.a=a;
        this.catPhysicalPower=catPhysicalPower;

    }
    public void grab(Mouse A){
        if (catPhysicalPower>=A.getPhysicalPower()){
            System.out.println(catName+"抓住"+A.getName()+catName+"体力上涨: "+A.getPhysicalPower());
            System.out.println(A.getName()+"体力变成0.");
        }else {
            System.out.println(A.getName()+"跑了！");
            System.out.println(catName+"与"+A.getName()+"的体力未变！");
        }
    }

    public String getCatName() {
        return catName;
    }

    public void setCatName(String catName) {
        this.catName = catName;
    }

    public int getA() {
        return a;
    }

    public void setA(int a) {
        this.a = a;
    }

    public int getCatPhysicalPower() {
        return catPhysicalPower;
    }

    public void setCatPhysicalPower(int catPhysicalPower) {
        this.catPhysicalPower = catPhysicalPower;
    }
}
